The present invention relates to data storage and in particular an efficient data buffer for use in a stereo image processing system which maximizes processing speed by reducing the number of accesses to the data buffer.
Image processing is conventionally performed by reading an image or a portion thereof into a memory device, e.g. RAM. The image data is accessed from the memory device by the image processor or circuitry for the image processing. Typically, image processing applications access the same picture elements, or pixels, multiple times, and the speed of the image processing is limited by the large number of required accesses to the memory device, independent of the speed or efficiency of the actual processing. Thus, the processing circuitry generally waits while data required for the processing is being retrieved from the memory. One approach used to address this problem is a double buffer, sometimes referred to as a “ping-pong” buffer. A “ping-pong” buffer is disclosed in U.S. Pat. No. 5,224,213 by Dieffenderfer et al. The ping-pong data buffer mechanism which transfers data from one data bus to another data bus includes a dual-port storage mechanism having a single storage array and two independent ports with each port having its own separate data, address and control lines. Write circuitry is coupled to one of the independent ports for receiving data from one of the data buses and storing it into a first portion of the storage array. Read circuitry is coupled to the other of the independent ports for simultaneously reading data from a second portion of the storage array and supplying it to the other data bus. Mode control logic is provided for enabling the storing and reading functions of the first and second portions of the storage array to be interchanged back and forth from time to time so that data may be read from one portion while data is being stored into the other portion and vice versa. The ping-pong buffer scheme provides one buffer for processing the current tasks while a second identical buffer is used to retrieve the next batch of data for processing. When both data retrieval and processing have completed their current tasks, the buffers are swapped such that newly retrieved data is used for processing and the old processing data is now overwritten with the next batch of data from memory. Although the ping-pong buffer scheme increases throughput and improves processing time, the ping-pong buffer scheme doubles the in-circuit storage and associated circuitry, since two full image portions are stored variations of the ping-pong buffer scheme for image processing applications have been disclosed in U.S. Pat. No. 7,038,689 by Willis.
Thus there is a need for a very efficient data buffer scheme which both minimizes the required amount of hardware, while at the same time provides a means for maximum processing throughput. Such a scheme can be achieved by noting a unique characteristic of the data processed in stereo imaging.
The term “stereo imaging” as used herein refers to the processing of images being input from two cameras focused on the same scene or object. Processing of “stereo imaging” is primarily though not exclusively concerned, with matching a patch of data from one camera (e.g. right-hand camera) with a corresponding image patch from the companion camera (e.g. left-hand camera). The patch and the corresponding patch both include images of the same object from slightly differing perspectives. The matching of the images allows calculation of disparity between the image patches which may be used to accurately calculate distance to the object based on known quantities such as the focal length of the camera lens and the distance between the cameras. The terms “moving” and “shifting” data are used herein interchangeably.